#include <stdio.h>
#include <stdarg.h>

int SqSum(int n1, ...)

{

va_list arg_ptr;

int nSqSum = 0, n = n1;

va_start(arg_ptr, n1);

while (n > 0)

{

    nSqSum += n;

    n = va_arg(arg_ptr, int);

}

va_end(arg_ptr);

return nSqSum;

}

 
int main() {

    printf("%d\n",SqSum(1,2,3,0));

    return 0;
}